from users.models import User
from .pushfile import request_to

def push_user_img(user, imgfile):
    res = request_to(imgfile,'',0)
    try:
        user.default_image = res
        user.save()
    except:
        return 'err'

    return 'ok'
